<?php
namespace app\erp\validate;
use think\Validate;
class AccessConfigrule extends Validate{
    protected $rule = [
        'controller_name'=>'require',
        'function_name' => 'require|unique:access_config,function_name^controller_name',
        'use_intro'=>'require'
    ];

    protected $message = [
        'controller_name.require' => '控制器必须填写',
        'function_name.require' => '功能必须填写',
        'function_name.unique' => '该控制器下的此功能已经存在',
        'use_intro.require' => '使用说明不能为空'
    ];
}